﻿Imports Microsoft.VisualBasic
Imports System.Data
Imports System.Globalization
Public Class MyObj


    Public Shared Sub MatchItem(ByVal Item As DropDownList, ByVal Value As String)
        If Item IsNot Nothing And Value IsNot Nothing Then
            Item.SelectedIndex = Item.Items.IndexOf(Item.Items.FindByValue(Value.Trim()))
        End If
    End Sub

    Public Shared Sub MatchItem(ByVal Item As RadioButtonList, ByVal Value As String)
        If Item IsNot Nothing And Value IsNot Nothing Then
            Item.SelectedIndex = Item.Items.IndexOf(Item.Items.FindByValue(Value.Trim()))
        End If
    End Sub
    Public Shared Sub MatchItem(ByVal Item As CheckBoxList, ByVal Value As String)
        If Item IsNot Nothing And Value IsNot Nothing Then
            Item.SelectedIndex = Item.Items.IndexOf(Item.Items.FindByValue(Value.Trim()))
        End If
    End Sub


End Class
